#!/bin/bash

set -e

export PYTHONWARNINGS=default
export PYTHONPYCACHEPREFIX=out/pycache
export ANKIDEV=${ANKIDEV-1}
export QTWEBENGINE_REMOTE_DEBUGGING=${QTWEBENGINE_REMOTE_DEBUGGING-8080}
export QTWEBENGINE_CHROMIUM_FLAGS=${QTWEBENGINE_CHROMIUM_FLAGS---remote-allow-origins=http://localhost:$QTWEBENGINE_REMOTE_DEBUGGING}
./ninja pylib qt pyenv-qt5.15
./out/pyenv-qt5.15/bin/python tools/run.py $*
